﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace ADB_QuanLyThuVien
{
    public partial class frmBorrowBook : DevExpress.XtraEditors.XtraForm
    {
        private Account acc;

        public frmBorrowBook()
        {
            InitializeComponent();
        }

        public frmBorrowBook(Account acc)
        {
            // TODO: Complete member initialization
            this.acc = acc;
            InitializeComponent();
        }

        private void frmBorrowBook_Load(object sender, EventArgs e)
        {
            Member mem = DAO_Member.SelectMember(acc);
            emailLabel1.Text = mem.Email;
            nameLabel1.Text = mem.Name;
            phoneNumberLabel1.Text = mem.PhoneNumber;
            List< PhieuMuon> list = DAO_PhieuMuon.SelectPhieuMuon(mem.Email);
            phieuMuonBindingSource.DataSource = list;
        }
    }
}